//
//  UISliderViewController.swift
//  Example
//
//  Created by T AO on 2022/2/16.
//

import UIKit
import RxSwift
import RxCocoa

class UISliderViewController: BaseViewController {

    override func viewDidLoad() {
        super.viewDidLoad()

        slider()
    }
    
    private func slider() {
        let slider = UISlider(frame: CGRect(x: 100, y: 100, width: 100, height: 20))
        slider.value = 0.1
        view.addSubview(slider)
        
        slider.rx.value
            .asObservable()
            .subscribe(onNext: { print("滑块当前值：\($0)") })
            .disposed(by: disposeBag)
    }

}
